<%@ Page language="c#" Codebehind="PageProperties.aspx.cs" AutoEventWireup="True" Inherits="CrossFactory.SiteNote.Admin.PageProperties" %>
<html>
	<head>
		<title>Page Properties</title>
		<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1" />
		<meta name="CODE_LANGUAGE" content="C#" />
		<meta name="vs_defaultClientScript" content="JavaScript" />
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
		<link href="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Stylesheets/StyleSheet.aspx" type="text/css" rel="stylesheet" />
		<script language="javascript" type="text/javascript" src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Scripts/website.js"></script>
		
		<script language="javascript" type="text/javascript">		
			function SelectPage()
			{
			    if((document.getElementById("rdbPageRedirect")))
			    {
			        var pageUri = document.all['txtRedirectUrl'].value;
			        if (pageUri.length < 5)
			        {
			            pageUri = "<%= this.CurrentPage == null ? "" : this.CurrentPage.SiteNotePageInfo != null ? this.CurrentPage.SiteNotePageInfo.VirtualPath : ""%>";
			        }
				    result = window.showModalDialog("<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>" + "/XmlEditor/PageSelector.aspx?AllowPositionSelection=true&disableNode=true"+"&pageUri="+pageUri, null, "dialogHeight: 450px; dialogWidth: 350px; edge: Raised; center: Yes; help: No; scroll:no; resizable: no; status: No;");
				}
				if (result.returnValue)
				{
					var res = result.selectedId.substr(2 + <%= CrossFactory.SiteNote.Components.Utils._ApplicationPath.Length %>);
					res = res.replace(".off.aspx",".aspx");
					document.all['txtRedirectUrl'].value = res;
				}
			}
			function EndSaveRename(url)
			{
				window.opener.navigate(url);
				window.close();
			}
			function EndSave()
			{
				window.opener.navigate(window.opener.location);
				window.close();
			}
			var subDialog;
			window.onfocus = ShowSubDialog;
			
			function OpenWindow(url)
			{
				subDialog = window.open(url, "subPageBasket", "channelmode=no,directories=no,fullscreen=no,location=no,menubar=no,resizable=yes,status=no,scrollbars=yes");
			}
			function ShowSubDialog()
			{
				try
				{
					subDialog.focus();
				}
				catch(ex)
				{
				}
			}
			function load()
			{
				ResizeDialogBoxSiteNote();
			}
		</script>
	</head>
	<body style="margin:0px">
		<form id="Form1" method="post" runat="server">
			<a id="size">
			<table height="100%" cellspacing="0" cellpadding="0" width="100%" border="0">
				<tr>
					<td valign="top" width="100%" height="32">
						<table height="32" cellspacing="0" cellpadding="0" width="100%" border="0">
							<tr>
								<td align="left" width="154" background="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/Layout/TopBackground.gif" colspan="2" height="19"><img height="19" src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/Layout/TopLeft.gif" width="154" alt="" /></td>
								<td align="right" width="100%" background="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/Layout/TopBackground.gif" height="32" rowspan="2"><img height="32" src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/Layout/logo.gif" width="165" alt="" /></td>
							</tr>
							<tr height="13">
								<td width="7" background="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/Layout/LeftBackgroundTop.gif" height="13"><img height="13" src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="7" alt="" /></td>
								<td width="147" height="13"><img height="13" src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="147" alt="" /></td>
							</tr>
						</table>
					</td>
				</tr>
				<tr height="100%">
					<td valign="top" width="100%" height="100%">
						<table height="100%" cellspacing="0" cellpadding="0" width="100%" border="0">
							<tr>
								<td width="7" background="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/Layout/LeftBackgroundBottom.gif"><img height="1" src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="7" alt="" /></td>
								<td width="5"><img height="1" src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="5" alt="" /></td>
								<td id="PageContent" valign="top" align="left" width="100%" height="100%">
									<table border="0" cellpadding="0" cellspacing="0">
										<tr>
											<td colspan="3" class="cmMessageTitle"><b>Page properties :</b></td>
										</tr>
										<tr>
											<td colspan="3" height="15"><asp:Label ID="lblResult" runat="server" Visible="false" CssClass="cmMessageUnable"></asp:Label></td>
										</tr>
										<tr>
											<td colspan="2" class="cmProperties" align="left">Page navigation title :</td>
											<td style="padding-left:6px;"><asp:TextBox id="txtPageTitle" runat="server" Width="200" CssClass="cmtextbox"></asp:TextBox>&nbsp;<a href="#" id="propertiesLink" runat="server"><img src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/history.gif" border="0" alt="History" /></a></td>
										</tr>
										<tr>
											<td colspan="2" class="cmProperties" align="left">Page title (optional) :</td>
											<td style="padding-left:6px;"><asp:TextBox id="txtPageBrowserTitle" runat="server" Width="200" CssClass="cmtextbox"></asp:TextBox></td>
										</tr>
										<tr>
											<td colspan="2" class="cmProperties" align="left">Page name :</td>
											<td style="padding-left:6px;"><asp:TextBox id="txtPageName" runat="server" Enabled="False" Width="200" CssClass="cmtextbox"></asp:TextBox><asp:RequiredFieldValidator id="RFVPageName" runat="server" Display="Dynamic" ErrorMessage="(*) Page name is required." Text="(*)" ControlToValidate="txtPageName" CssClass="createPageValidator"></asp:RequiredFieldValidator><asp:RegularExpressionValidator id="RegularExpressionValidatorName" runat="server" ValidationExpression="[\w\b\-_]+" Display="Dynamic" ControlToValidate="txtPageName" ErrorMessage="(*) Allowed characters: (a-z,A-Z,0-9,-,_)." Text="(*)" CssClass="createPageValidator"></asp:RegularExpressionValidator>&nbsp;<asp:CheckBox ID="chkRename" runat="server" Text="Rename" CssClass="cmtextbox" AutoPostBack="true" OnCheckedChanged="chkRename_CheckedChanged" />
											<asp:HiddenField id="currentPageName" runat="server"/>
											</td>
										</tr>
										<tr>
											<td colspan="2" class="cmProperties" align="left">Page keywords :</td>
											<td style="padding-left:6px;"><asp:TextBox id="txtPageKeywords" runat="server" Width="200" CssClass="cmtextbox"></asp:TextBox></td>
										</tr>
										<tr>
											<td colspan="2" class="cmProperties" align="left">Page description :</td>
											<td style="padding-left:6px;"><asp:TextBox id="txtPageDescription" runat="server" Width="200" CssClass="cmtextbox"></asp:TextBox></td>
										</tr>
										<tr>
											<td colspan="2" class="cmProperties" align="left">Page robots :</td>
											<td style="padding-left:6px;">
											    <asp:DropDownList id="ddlrobots" runat="server" Width="200" CssClass="cmtextbox">
											        <asp:ListItem Value="index,follow" Text="index,follow" />
											        <asp:ListItem Value="index,nofollow" Text="index,nofollow" />
											        <asp:ListItem Value="noindex,nofollow" Text="noindex,nofollow" />
											    </asp:DropDownList>
											</td>
										</tr>
										<tr>
										    <td><asp:RadioButton ID="rdbPageGroup" runat="server" AutoPostBack="true" oncheckedchanged="rdbPageGroup_CheckedChanged" /></td>
											<td class="cmProperties" align="left">Page group :</td>
											<td style="padding-left:2px;" colspan="2"><asp:CheckBox id="chkContainer" runat="server" AutoPostBack="true" oncheckedchanged="chkContainer_CheckedChanged"></asp:CheckBox></td>
										</tr>
										<tr>
										    <td><asp:RadioButton ID="rdbPageRedirect" runat="server" AutoPostBack="true" oncheckedchanged="rdbPageRedirect_CheckedChanged" /></td>
											<td class="cmProperties" align="left">Redirect address :</td>
											<td style="padding-left:6px;"><input type="text" id="txtRedirectUrl" name="txtRedirectUrl" runat="server" class="cmtextbox" /><input type="button" class="btnValue" id="btnChoosePage" name="ChoosePage" runat="server" value="Choose page" onclick="SelectPage();" /></td>
										</tr>
										<tr>
											<td colspan="2" class="cmProperties" align="left">Hidden page :</td>
											<td style="padding-left:2px;" colspan="2"><asp:CheckBox id="chkHide" runat="server" AutoPostBack="true" oncheckedchanged="chkHide_CheckedChanged"></asp:CheckBox></td>
										</tr>
										<tr>
											<td colspan="2" class="cmProperties" align="left">Offline page :</td>
											<td style="padding-left:2px;" colspan="2"><asp:CheckBox id="chkOffline" runat="server" AutoPostBack="true" oncheckedchanged="chkOffline_CheckedChanged"></asp:CheckBox></td>
										</tr>
										<tr>
										    <td colspan="3">
										        <asp:ValidationSummary runat="server" ID="ValidationSummary" ShowMessageBox="true" ShowSummary="True" DisplayMode="List" CssClass="createPageValidator"></asp:ValidationSummary>
										    </td>
										</tr>
									</table>
								</td>
								<td width="5"><IMG height="1" src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="5"></td>
								<td width="11" background="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/Layout/RightBackground.gif"><IMG height="1" src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="11"></td>
							</tr>
						</table>
					</td>
				</tr>
				<tr height="40">
					<td>
						<table height="100%" cellspacing="0" cellpadding="0" border="0">
							<tr>
								<td height="8"><img src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/Layout/FooterLeft.gif" alt="" /></td>
								<td width="100%">
									<table height="100%" cellspacing="0" cellpadding="0" width="100%" border="0">
										<tr>
											<td width="100%" background="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/Layout/FooterCenter.gif" height="8"></td>
											<td height="8"><img height="8" src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/Layout/FooterRight.gif" width="255" alt="" /></td>
										</tr>
									</table>
								</td>
							</tr>
							<tr>
								<td align="right" width="100%" colspan="3">
									<table style="BACKGROUND: url(<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/Layout/Footer.gif) no-repeat right 50%" height="100%" width="100%" border="0">
										<tr>
											<td width="100%"></td>
											<td><asp:Button id="cmdSave" runat="server" Text="Save" Width="75" Height="23" CssClass="cmtext" onclick="cmdSave_Click"></asp:Button></td>
											<td><input type="button" value="Cancel" onclick="window.close();" style="width:75;height:23" class="cmtext" /></td>
											<td width="1"></td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			</a>
		</form>
	</body>
</html>
